package com.ning.weixin.service.impl;

import com.ning.weixin.entity.ClockAddress;
import com.ning.weixin.mapper.ClockAddressMapper;
import com.ning.weixin.service.ClockAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ClockAddressServiceImpl implements ClockAddressService {

    @Autowired
    private ClockAddressMapper mapper;

    @Override
    public Integer getClockNumById(String addressId) {
        if (addressId != null){
            return mapper.getClockNumById(addressId);
        }
        return null;
    }

    @Override
    public void subDownClockNum(ClockAddress clockAddress) {
        if (clockAddress != null){
            mapper.subDownClockNum(clockAddress);
        }
    }

    @Override
    public String getClockAddress(String addressId) {
        if (addressId != null){
            return mapper.getClockAddress(addressId);
        }
        return null;
    }
}
